#########################################################
#
#  The makefile for Borland/Embarcadero C/C++ Compiler
#
#########################################################

!include incMake\bcc\config.mak


# target description #

debug:
    $(MAKE) -DBUILD=debug    -f Makefile.bcc.mak  all
release:
    $(MAKE) -DBUILD=release  -f Makefile.bcc.mak  all

all: mk_dir libn2base n2asm_x86 n2asm_x8664

libn2base:
	$(MAKE) -DBUILD=$(BUILD)  -f incMake\bcc\libn2base.mak
n2asm_x86: libn2base
	$(MAKE) -DBUILD=$(BUILD)  -f incMake\bcc\n2asm_x86.mak
n2asm_x8664: libn2base
	$(MAKE) -DBUILD=$(BUILD)  -f incMake\bcc\n2asm_x8664.mak



##########################################################
mk_dir:
    @if not exist $(OBJDIR) mkdir $(OBJDIR)
    @if not exist $(BINDIR) mkdir $(BINDIR)
clean:
    @echo Removing ...
    @-del /S $(OBJDIR)\*.obj
    @-del $(BINDIR)\*.obj
    @-del $(BINDIR)\*.exe
    @-del $(BINDIR)\*.dll
    @-del $(BINDIR)\*.lib
    @-del $(BINDIR)\*.ilc
    @-del $(BINDIR)\*.ild
    @-del $(BINDIR)\*.ilf
    @-del $(BINDIR)\*.ils
    @-del $(BINDIR)\*.ilk
    @-del $(BINDIR)\*.pdb
    @-del $(BINDIR)\*.exp
    @-del $(BINDIR)\*.tds
    @-del $(BINDIR)\*.map
    @echo clean finished.

